package edu.lnu.ums.dal;

import edu.lnu.ums.entities.core.AbstractEntity;
import java.util.List;
import javax.persistence.EntityManagerFactory;

public interface IGenericDAO<T extends AbstractEntity> {
    List<T> getAllOrdered(EntityManagerFactory factory);

    List<T> getAllUnordered(EntityManagerFactory factory);
    
    T getById(EntityManagerFactory factory, Long id);
    
    void persist(EntityManagerFactory factory, T obj);
    
    void delete(T obj);
}
